package com.ycz.pattern.behaviour.templatepattern;

/**
 * @Description
 * @ClassName Game
 * @Author yanchengzhi
 * @date 2023.10.20 02:46
 */
public abstract class Game {

    abstract void initialize();
    abstract void startPlay();
    abstract void endPlay();

    // 模板方法定义为final
    public final void play() {
        this.initialize();
        this.startPlay();
        this.endPlay();
    }

}
